package com.hcs.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author hcs
 * @since 2025-01-12 10:06
 */
@Getter
@Setter
@TableName("order_detail")
@Schema(name = "OrderDetail", description = " 订单详情表")
public class OrderDetail {

    // 主键
    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    // 订单id
    @Schema(description = "订单id")
    @TableField("order_id")
    private Long orderId;

    // 菜品id
    @Schema(description = "菜品id")
    @TableField("dish_id")
    private Long dishId;

    // 数量
    @Schema(description = "数量")
    @TableField("quantity")
    private Integer quantity;

    // 价格
    @Schema(description = "价格")
    @TableField("price")
    private BigDecimal price;

    // 创建时间
    @Schema(description = "创建时间")
    @TableField("created_at")
    private Date createdAt;

    // 更新时间
    @Schema(description = "更新时间")
    @TableField("updated_at")
    private Date updatedAt;
}
